package com.key.common.utils;

import lombok.extern.slf4j.Slf4j;

import java.lang.reflect.Field;

@Slf4j
public class StringIsNotNull {
    public static boolean checkObjFieldIsNull(Object obj) throws IllegalAccessException {

        boolean flag = false;
        for(Field f : obj.getClass().getDeclaredFields()){
            f.setAccessible(true);
            log.info(f.getName());
            if(f.get(obj) == null || f.get(obj).equals("")){
                flag = true;
                return flag;
            }
        }
        return flag;
    }
}
